<include file="public@header"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInUp js-check-wrap">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>友情链接</h5>
                    <div class="ibox-tools">
                        <a href="#" class="btn btn-primary btn-xs active">所有链接</a>
                        <a href="{:url('link/add')}" class="btn btn-primary btn-xs">添加链接</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form class="js-ajax-form" action="{:url('Link/listOrder')}" method="post">
                        <div class="table-actions">
                            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
                            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('link/toggle',array('display'=>1))}" data-subcheck="true">{:lang('DISPLAY')}
                            </button>
                            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('link/toggle',array('hide'=>1))}" data-subcheck="true">{:lang('HIDE')}
                            </button>
                        </div>
                        <php>$status=array("1"=>lang('DISPLAY'),"0"=>lang('HIDDEN'));</php>
                        <table class="table table-hover table-bordered table-list">
                        <thead>
                        <tr>
                            <th width="16">
                                <label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label>
                            </th>
                            <th width="50">
                                {:lang('SORT')}
                            </th>
                            <th width="50">
                                ID
                            </th>
                            <th>
                                {:lang('NAME')}
                            </th>
                            <th>
                                链接地址
                            </th>
                            <th width="50">
                                {:lang('STATUS')}
                            </th>
                            <th width="120">
                                {:lang('ACTIONS')}
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <foreach name="links" item="vo">
                        <tr>
                            <td>
                                <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}">
                            </td>
                            <td>
                                <input name='list_orders[{$vo.id}]' class="input input-order mr5" type='text' size='3' value='{$vo.list_order}'>
                            </td>
                            <td>
                                {$vo.id}
                            </td>
                            <td>
                                {$vo.name}
                            </td>
                            <td>
                                <a href="{$vo.url}" target="_blank">{$vo.url}</a>
                            </td>
                            <td>
                                {$status[$vo['status']]}
                            </td>
                            <td>
                                <a href="{:url('link/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                                <a href="{:url('link/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">
                                        {:lang('DELETE')}
                                </a>
                            </td>
                        </tr>
                        </foreach>
                        </tbody>
                        <tfoot>
                        <tr>
                            <th width="16">
                                <label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label>
                            </th>
                            <th width="50">
                                {:lang('SORT')}
                            </th>
                            <th width="50">
                                ID
                            </th>
                            <th>
                                {:lang('NAME')}
                            </th>
                            <th>
                                链接地址
                            </th>
                            <th width="50">
                                {:lang('STATUS')}
                            </th>
                            <th width="120">
                                {:lang('ACTIONS')}
                            </th>
                        </tr>
                        </tfoot>
                        </table>
                        <div class="pagination">
                            {$page|default=''}
                        </div>
                        <div class="table-actions">
                            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
                            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('link/toggle',array('display'=>1))}" data-subcheck="true">{:lang('DISPLAY')}
                            </button>
                            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('link/toggle',array('hide'=>1))}" data-subcheck="true">{:lang('HIDE')}
                            </button>
                        </div>
                         </form>
                    </div>
            </div>
        </div>
    </div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>